package components

import "github.com/go-fuego/fuego/examples/full-app-gourmet/store"

templ Slider() {
	<ul class="flex flex-row gap-4 overflow-x-auto py-2 md:gap-8">
		{ children... }
	</ul>
}

templ SliderRecipes(recipes []store.Recipe) {
	@Slider() {
		for _, recipe := range recipes {
			@Card(CardProps{
					Title: recipe.Name,
					WhenToEat: recipe.WhenToEat,
					Link: "/recipes/" + recipe.ID,
					ImageURL: recipe.ImageUrl,
					Body: recipe.Description,
				})
		}
	}
}
